<template>
  <web-view :src="`${data._url}/wx_authorize/check_wxopenid?openid=${data.openid}`" @message="bindmessage"
    @onPostMessage="getMsg"></web-view>
</template>

<script setup>
import { reactive, } from 'vue';
import { onShow, onLoad } from '@dcloudio/uni-app';
import ajax from "@/utils/ajax.js";

const data = reactive({
  _url: ajax.apiUrl,
  openid: ''
});

onLoad((e) => {
  let openid = uni.getStorageSync('userInfo').xcx_openid
  console.log(openid)
  data.openid = openid;
});

function bindmessage(e) {
  var follow = e.detail.data[0].follow;
  console.log(follow, '关注情况关注情况')
  // if(follow != '1'){
  //   app.judge_follow();
  // }
}
function getMsg(e) {
  var follow = e.detail.data[0].follow;
  console.log(follow, '关注情况关注情况2')
}

</script>

<style lang="scss" scoped></style>